<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 构造函数
        const obj = {
            uname: 'zs',
            age: 18,
            20: 20
        }
        const arr = [1, 2, 3]
        obj.uname
        obj['age']

        // const newObj = Object.create(obj)
        // console.log(newObj);
        // for (let key in arr) {
        //     console.log(key);
        // }
        // console.log(Object.keys(obj));
        // console.log(new Map([['uname', 'zs'], [function () { }, 18]]));

        function Star (uname, age, panits) {
            // console.log(1);
            this.chicken = uname
            this.basketball = age
            this.beidaiku = panits
            this.dance = function () {
                console.log('我会跳舞');
            }
            // console.log(2);
        }
        // Star()
        const cxk = new Star('ikun', '2年半')
        console.log(cxk);
        cxk.dance()

    </script>
</body>

</html>